import React, { Component } from 'react'

import { Route, NavLink, Redirect } from 'react-router-dom'

const Home = () => (<div>home</div>)
const About = () => (<div>about</div>)

export default class extends Component {
  render() {
    return (
      <div>
        <NavLink to="/">
          home
        </NavLink>
        <NavLink to="/about">
          about
        </NavLink>
        <Route path="/home" exact>
          <Home></Home>
        </Route>
        <Route path="/about">
          <About></About>
        </Route>
        <Redirect from="/" to="/home"></Redirect>
      </div>
    )
  }
}
